package com.mercury.user.service.impl;

import com.mercury.user.entity.CenterMallUser;
import com.mercury.user.entity.VO.ExchangeItemInfo;
import com.mercury.user.entity.VO.UserInfoVo;
import com.mercury.user.mapper.CenterMallUserMapper;
import com.mercury.user.service.CenterMallUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mercury.util.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tong
 * @since 2021-11-22
 */
@Service
public class CenterMallUserServiceImpl extends ServiceImpl<CenterMallUserMapper, CenterMallUser> implements CenterMallUserService {

    @GetMapping("/exchangeList/{userId}")
    @ApiOperation(value = "获得用户的兑换列表")
    public R exchangeList(@PathVariable String userId) {
        return R.ok();
    }

    @Override
    public List<ExchangeItemInfo> getExchangeList(String userId) {
        List<ExchangeItemInfo>  itemInfoList = baseMapper.getExchangeList(userId);
        return itemInfoList;
    }
}
